package com.bbs.eventListener;


import com.bbs.dto.UserDTO;
import com.bbs.event.LoginSuccessEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;
//事件监听服务
@Service
public class LoginSuccessListener {

    //监听登录事件,在登录后发布优惠券等
    @EventListener()
    public void randomGetCoupon(LoginSuccessEvent loginSuccessEvent){
        UserDTO userDTO = loginSuccessEvent.getUserDTO();
        Long id = userDTO.getId();
       //调用相应服务

    }





}
